import axios from "../index"

export const getMenus = () => {
    return axios({
        method: 'get',
        url: '/api/admin/getMenus'
    })
}

//获取主页数据的api
export const getData = () => {
    return axios({
        method: 'get',
        url: '/api/admin/statistics/home/index'
    })
}

//可视化主页图表
export const getEchart = () => {
    return axios({
        method: 'get',
        url: '/api/admin/statistics/home/chart/order'
    })
}

//每周的数据可视化
export const getWeek = () => {
    return axios({
        method: 'get',
        url: '/api/admin/statistics/home/chart/order/week'
    })
}
//每月的可视化数据
export const getMonth = () => {
    return axios({
        method: 'get',
        url: '/api/admin/statistics/home/chart/order/month'
    })
}
//每年的可视化数据
export const getYear = () => {
    return axios({
        method: 'get',
        url: '/api/admin/statistics/home/chart/order/year'
    })
}

//用户可视化区域


export const getUserList = () => {
    return axios({
        method: 'get',
        url: '/api/admin/statistics/home/chart/user'
    })
}


//请求主页的logo图片

export const getLogo = (key) => {
    return axios({
        method: 'get',
        url: '/api/admin/system/config/getuniq',
        params: {
            key
        }
    })
}

//根据token拿到自定义指令鉴权数据
export const getAllInfo = (token) => {
    return axios({
        method: 'get',
        url: '/api/admin/getAdminInfoByToken',
        params: {
            token

        }
    })
}
